﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Moq;
using Moq.Protected;
using NUnit.Framework;
using System.Reflection;

namespace MoqContrib.AutoMock.Tests.AutoMockingContainers
{
    #region Types used for testing
    public interface IService {
		void Meth();
		string Func();
	}
    #endregion

    class TestBase
    {
        protected Mock<AutoMockHelper> _container;
        protected Mock<IMockHeap> _heap;
        protected Mock<IMockGenerator> _generator;


        [SetUp]
        public virtual void Given()
        {
            _heap = new Mock<IMockHeap>();
            _generator = new Mock<IMockGenerator>();
            _container = new Mock<AutoMockHelper>(_heap.Object, _generator.Object);
            _container.CallBase = true;
            _container.SetupAllProperties();
            _container.Protected().Setup("RegisterInstance", ItExpr.IsAny<Type>(),
                ItExpr.IsAny<object>());
        }

    }
}
